import request from "@/utils/request";
// 添加列表
export const getRoleApi = (role_name, page, limit) => {
  return request({
    url: `/permission/role?${role_name}=&page=${page}&limit=${limit}`,
  });
};
//
// 添加列表
export const getRoleCheckApi = (data) => {
  return request({
    url: `/permission/menu`,
    data,
  });
};
// 删除列表
export const delRoleListApi = (id) => {
  return request({
    url: `/permission/role/${id}`,
    method: "DELETE",
  });
};
// 添加列表
export const addRoleListApi = (data) => {
  return request({
    url: `/permission/role`,
    method: "POST",
    data,
  });
};
// 添加列表
export const showRoleListApi = (id) => {
  return request({
    url: `/permission/role/${id}`,
  });
};
// 编辑

export const edlRoleListApi = (data) => {
  return request({
    url: `/permission/role/${data.id}`,
    method: "PUT",
    data,
  });
};
